package com.datatypes;
import java.io.Serializable;
import java.util.ArrayList;

public class AEuser implements Serializable{

	// data members

	
	ArrayList<String> friends;
	ArrayList<Activity> activities;
 
	
	// user unique facebook id

	private String facebook_id;

	// users facebook code

	private String facebook_code;

	// users device ID code
	private String dev_id;

	// users registration ID code
	private String reg_id;

	// user first name
	private String first_name;

	// user last name
	private String last_name;

	// user age, should be grater then 8
	private int age;

	// user email, as setup in facebook
	private String email;

	// user weight, should be greater then 40
	private double weight;

	// user workout_level (0.8 is the highest(best shape) and 1 is the lowest)
	private double workout_level;

	private String android_state;

	private ArrayList<Track> userTracks = null;

	private long last_updated;

	// user gender ("male"/"female"/"unknown")
	private String gender;

	// default constructor
	public AEuser() {
		age = 0;
		facebook_id = null;
		first_name = null;
		last_name = null;
		email = null;
		workout_level = 0.9; // default value
		gender = "unknown"; // default value
		weight = 65; // default value
		this.android_state = "No android use";
		this.last_updated = 0;
		userTracks = new ArrayList<Track>();
		friends = new ArrayList<String>();
		activities = new ArrayList<Activity>();
	}

	public AEuser(int age, String id, String name, String Lname, String email,
			double wl, String gender, double weight) {
		this.age = age;
		this.facebook_id = id;
		this.first_name = name;
		this.last_name = Lname;
		this.email = email;
		this.workout_level = wl;
		this.gender = gender;
		this.weight = weight;
		this.android_state = "No android use";
		this.last_updated = 0;
		userTracks = new ArrayList<Track>();
		friends = new ArrayList<String>();
		activities = new ArrayList<Activity>();
	}

	// member functions
	public boolean SignedIn() {
		// tmp
		return false;
	}

	public String GetFirstName() {
		return first_name;
	}

	public String GetLastName() {
		return last_name;
	}

	public int GetAge() {
		return age;
	}

	public double GetWorkoutLevel() {
		return workout_level;
	}

	public String GetEmail() {
		return email;
	}

	public String GetFacebookID() {
		return facebook_id;
	}

	public double GetWeight() {
		return weight;
	}

	public String GetGender() {
		return gender;
	}

	public void SetFirstName(String first_name) {
		this.first_name = first_name;
	}

	public void SetLastName(String last_name) {
		this.last_name = last_name;
	}

	public void SetAge(int age) {
		this.age = age;
	}

	public void SetWeight(double weight) {
		this.weight = weight;
	}

	public void SetEmail(String email) {
		this.email = email;
	}

	public void SetFacebookID(String facebook_id) {
		this.facebook_id = facebook_id;
	}

	public void SetWorkoutLevel(double workout_level) {
		this.workout_level = workout_level;
	}

	public void SetGender(String gender) {
		this.gender = gender;
	}

	public String getFacebook_code() {
		return facebook_code;
	}

	public void setFacebook_code(String facebook_code) {
		this.facebook_code = facebook_code;
	}

	public String getDev_id() {
		return dev_id;
	}

	public void setDev_id(String dev_id) {
		this.dev_id = dev_id;
	}

	public String getReg_id() {
		return reg_id;
	}

	public void setReg_id(String reg_id) {
		this.reg_id = reg_id;
	}

	@Override
	public String toString() {
		return "User id: " + this.facebook_id + " User name: "
				+ this.first_name + " " + this.last_name;
	}

	public String getAndroid_state() {
		return android_state;
	}

	public void setAndroid_state(String android_state) {
		this.android_state = android_state;
	}

	public long getLast_updated() {
		return last_updated;
	}

	public void setLast_updated(long last_updated) {
		this.last_updated = last_updated;
	}

	public ArrayList<Track> GetTracks() {
		return this.userTracks;
	}

	public void AddTrack(Track track) {
		this.userTracks.add(track);
	}
	
	public ArrayList<String> GetSporTeamFriends()
	{
		return this.friends;
	}
	
	public void InitSporTeamFriends()
	{
		this.friends = new ArrayList<String>();
	}
	
	public ArrayList<Activity> GetActivities()
	{
		return this.activities;
	}
	
	public void SetActivities(ArrayList<Activity> activities)
	{
		this.activities = activities;
	}
	
	public void SetTracks(ArrayList<Track> tracks)
	{
	   this.userTracks = tracks;
	}
	
	public void SetFriends(ArrayList<String> friends)
	{
		this.friends = friends;
	}
	
 
	

}
